import { dateFormat } from '@/util/date';
export const startDate = dateFormat(new Date(), 'yyyy-MM-') + '01 00:00:00';
export const endDate = dateFormat(new Date(), 'yyyy-MM-dd')+ ' 00:00:00';
export const tableOption = {
  selection: true,
  selectable:(row,index)=>{
    /*
	if(row.reviewStatus == '0' || row.reviewStatus == '3'){
      return true;
    }
    return false;*/
	return true;
  },
  "border": true,
  "index": true,
  "indexLabel": "序号",
  "stripe": true,
  "menuAlign": "center",
  "addBtn": true,
  "editBtn": false,
  "delBtn": false,
  "align": "center",
  "searchMenuSpan": 6,
  height: 450,
  "column": [
	  {
      "type": "input",
      "label": "唯一标识",
      "prop": "id",
      hide:true,
      addDisplay:false,
      editDisplay:false
    },	  {
      "type": "input",
      "label": "申请部门ID",
      "prop": "applyDeptId",
      hide:true,
      addDisplay:false,
      editDisplay:false
    },	  {
      "type": "input",
      "label": "调票记录表id",
      "prop": "cycleId",
      hide:true,
      addDisplay:false,
      editDisplay:false
    },	  {
      "type": "select",
      "label": "票种",
      "prop": "ticketType",
      cascaderItem: ["ticketTypeParam"],
      props:{
        label:'mainName',
        value:'mainEnName'
      },
	  search:true,
      dicUrl:'/support/swpmticketcardtype/dict',
      rules: [{required: true, message: '请选择票种'}]
    },	  {
      "type": "select",
      "label": "车票名称",
      "prop": "ticketTypeParam",
      dicFlag: false,
      props:{
        label:'subName',
        value:'subEnName'
      },
	  search:true,
      dicUrl:'/support/swpmticketcardtypeparam/dictAll/{{key}}',
      rules: [{ required: true, message: '请输入车票名称' }]
    },	  {
      "type": "number",
      "label": "次数",
      "prop": "ticketNumber"
    },	  {
      "type": "number",
      "label": "金额",
      "prop": "ticketMoney",
      "precision": 2,
    },	  {
      "type": "number",
      "label": "计划数量",
      "prop": "cycleNumber",
      rules: [{required: true, message: '请输入计划数量'}]
    },	  {
      "type": "select",
      label: "申请线路",
      prop: "applyLine",
      cascaderItem: ["applyStation"],
      props: {
        label: 'name',
        value: 'code'
      },
      dicUrl: "/support/swparamline/dict",
      addDisplay: false,
      editDisplay:false
    },{
      "type": "select",
      label: "申请站点",
      prop: "applyStation",
      props: {
        label: 'name',
        value: 'code'
      },
      dicUrl: `/support/swparamstation/dict/{{key}}`,
      addDisplay: false,
      editDisplay:false
    },  {
      "type": "date",
      "label": "申请时间",
      "prop": "applyTime",
      search:true,
      searchValue: [startDate, endDate],
      searchRange: true,
      searchSpan: 12,
      format: 'yyyy-MM-dd',
      valueFormat: 'yyyy-MM-dd HH:mm:ss',
      rules: [{required: true, message: '请选择申请时间'}]
    },{
      "type": "select",
      "label": "调出线路",
      "prop": "outLineCode",
      cascaderItem: ["outStationCode"],
      props: {
        label: 'name',
        value: 'code'
      },
      dicUrl: "/support/swparamline/dict",
      rules: [{required: true, message: '请选择调出线路'}]
    }, {
      "type": "select",
      "label": "调出站点",
      "prop": "outStationCode",
      dicFlag: false,
      props: {
        label: 'name',
        value: 'code'
      },
      dicUrl: "/support/swparamstation/dict/{{key}}",
      rules: [{required: true, message: '请选择调出站点'}]
    },{
      "type": "input",
      "label": "特殊工作卡卡号",
	  "width": 120,
      "prop": "specialCardNo"
    },{
      "type": "input",
      "label": "调票原因",
      "prop": "cycleCase"
    },{
      "type": "input",
      "label": "审批人",
      "prop": "makePerson",
      hide:true,
      addDisplay:false,
      editDisplay:false
    },	  {
      "type": "input",
      "label": "审批人工号",
      "prop": "makePersonCode",
      hide:true,
      addDisplay:false,
      editDisplay:false
    },	  {
      "type": "input",
      "label": "审批时间",
      "prop": "makeTime",
      hide:true,
      addDisplay:false,
      editDisplay:false
    },	  {
      "type": "select",
      "label": "状态",
      "prop": "reviewStatus",
      search:true,
      addDisplay: false,
      editDisplay:false,
      dicUrl:'/admin/dict/type/stm_cycle_apply_status'
    },	  {
      "type": "input",
      "label": "办理状态",
      "prop": "handleStatus",
      addDisplay: false,
      editDisplay:false,
      dicUrl:'/admin/dict/type/stm_cycle_handle_status'
    },	  {
      "type": "input",
      "label": "备注",
      "prop": "remark",
      hide:true,
      addDisplay:false,
      editDisplay:false
    },	  {
      "type": "input",
      "label": "部门id",
      "prop": "deptId",
      hide:true,
      display:false
    },	  {
      "type": "input",
      "label": "创建人id",
      "prop": "creatorId",
      hide:true,
      display:false
    },	  {
      "type": "input",
      "label": "创建人",
      "prop": "creatorName",
      hide:true,
      display:false
    },	  {
      "type": "input",
      "label": "创建时间",
      "prop": "createTime",
      hide:false,
      display:false
    },	  {
      "type": "input",
      "label": "修改时间",
      "prop": "updateTime",
      hide:true,
      display:false
    } ]
}
